package com.prs.crm.service.stock.impl;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import com.prs.crm.dao.stock.ProductStoreDao;
import com.prs.crm.domain.stock.Product;
import com.prs.crm.domain.stock.ProductStore;
import com.prs.crm.domain.store.StoreRoom;
import com.prs.crm.service.impl.BaseServiceImpl;
import com.prs.crm.service.stock.ProductStoreService;

public class ProductStoreServiceImpl extends
		BaseServiceImpl<ProductStore, ProductStoreDao> implements
		ProductStoreService {

	@Override
	public List<ProductStore> getAllRecord(int product) {

		return this.getDao().getRecord(product);
	}

	@Override
	public ProductStore getPrStore(Serializable id) {

		return this.getDao().getPrStore(id);
	}

	@Override
	public void savePrStore(ProductStore pr) {

		this.getDao().savePrStore(pr);
	}

	@Override
	public ProductStore getStore(StoreRoom room, Product product,
			String batchNum) {
		return this.getDao().getStore(room, product, batchNum);
	}

	@Override
	public List<ProductStore> getProductStoreSize(int code, int roomid,
			String batchNum) {

		return this.getDao().getProductStoreSize(code, roomid, batchNum);
	}

	@Override
	public ProductStore getProductStoreObject(Product id, StoreRoom room,
			String batchNum) {

		return this.getDao().getProductStoreObject(id, room, batchNum);
	}

	@Override
	public String getNum(Product id, StoreRoom room, String batchNum) {

		return this.getDao().getNum(id, room, batchNum);
	}

	@Override
	public Collection<ProductStore> getAllProductStores() {

		return this.getDao().getAllProductStores();
	}

	public double getStoreNums(Product id, StoreRoom room) {

		return this.getDao().getStoreNums(id, room);
	}

	@Override
	public double getStoreNums(Product id, StoreRoom room, String batchNum) {
		return this.getDao().getStoreNums(id, room, batchNum);
	}

	@Override
	public List<ProductStore> getProductStores(Product product, StoreRoom room) {
	
		return this.getDao().getProductStores(product, room);
	}


	@Override
	public void saveStockNums(StoreRoom room) {
		// TODO Auto-generated method stub
		this.getDao().saveStockNums(room);
	}

	@Override
	public List<String> findRoomCodes() {
		// TODO Auto-generated method stub
		return this.getDao().findRoomCodes();
	}

	@Override
	public List<ProductStore> findproductNum(String roomcode) {
		// TODO Auto-generated method stub
		return this.getDao().findproductNum(roomcode);
	}

	@Override
	public List<Integer> findproductId(String roomcode) {
		// TODO Auto-generated method stub
		return this.getDao().findproductId(roomcode);
	}

}
